package bigdata.backend.utils;

public class SleepUtil {
    /**
     * 暂停执行指定毫秒数
     * @param millis 毫秒数
     */
    public static void sleep(long millis) {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new RuntimeException("睡眠被中断", e);
        }
    }

    /**
     * 暂停执行 0.1 秒
     */
    public static void sleep100ms() {
        sleep(100);
    }
}
